import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/Navc/home"
  },
  {
    path: '/Navc',
    name: 'Navc',
    component: () => import("../views/Navc.vue"),
    children: [{
      path: '/Navc/home',
      name: 'home',
      component: () => import("../views/Home.vue")
    },
    {
      path: "/Navc/rank",
      name: "rank",
      component: () => import("../components/Rank.vue")
    },
    {
      path: '/Navc/Singer',
      name: 'Singer',
      component: () => import( '../components/Singer.vue')
    },
    {
      path: '/Navc/Playlist',
      name: 'Playlist',
      component: () => import( '../components/Playlist.vue')
    },
    {
      path: '/Navc/Station',
      name: 'Station',
      component: () => import( '../components/Station.vue')
    },
    {
      path: '/Navc/NewDish',
      name: 'NewDish',
      component: () => import( '../components/NewDish.vue')
    },]
  },

  {
    path: "/login",
    component: () => import("../components/Login.vue")
  },
  {
    path: "/Mymusic",
    component: () => import("../views/Mymusic.vue")
  },
  
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
